﻿<Window x:Class="DocumentManagement.AddDocumentOut"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:DocumentManagement.ViewsModels"
        Title="AddDocumentOut" Height="768" Width="1024" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <vm:AddDocumentOutViewsModel x:Key="addDocumentOutViewsModel"/>

        <ContextMenu x:Key="MyContextMenu">
            <MenuItem Header="ลบไฟล์หนังสือเข้า" Name="deleteINDocMenu" Click="deleteINDocMenu_Click" />
        </ContextMenu>
    </Window.Resources>

        <Grid  Margin="10,10,-10,-10" DataContext="{Binding Source={StaticResource addDocumentOutViewsModel}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="350*" />
                <ColumnDefinition Width="652*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="70" />
                <RowDefinition Height="42" />
                <RowDefinition Height="42" />
                <RowDefinition Height="42" />
                <RowDefinition Height="42" />
                <RowDefinition Height="42" />
                <RowDefinition Height="42" />
                <RowDefinition Height="42" />
                <RowDefinition Height="42" />
                <RowDefinition Height="42" />
                <RowDefinition Height="100" />
                <RowDefinition Height="42" />
                <RowDefinition Height="602*" />
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="1" Name="stackPanel2" Orientation="Horizontal">
            <TextBlock FontSize="14" Height="23" Name="textBlock3" Text="ชนิดหนังสือ :" TextAlignment="Right" Width="119" FontFamily="Tahoma" />
            <GroupBox Height="33" Name="groupBox2" Width="210" Margin="10,0,0,0">
                <Grid Height="31">
                    <RadioButton Content="ภายนอก" FontSize="14" Height="25" HorizontalAlignment="Left" IsChecked="{Binding Path=MyTypeDoc1, Mode=TwoWay}" IsEnabled="True" Margin="6,6,0,0" Name="StatusDocRadioButton1" VerticalAlignment="Top" Checked="StatusDocRadioButton1_Checked" TabIndex="1" FontFamily="Tahoma" />
                    <RadioButton Content="ภายใน" FontSize="14" Height="25" HorizontalAlignment="Right" IsChecked="{Binding Path=MyTypeDoc2, Mode=TwoWay}" Margin="0,6,37,0" Name="StatusDocRadioButton2" VerticalAlignment="Top" Checked="StatusDocRadioButton2_Checked" TabIndex="2" FontFamily="Tahoma" />
                </Grid>
            </GroupBox>
        </StackPanel>
            <StackPanel Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" HorizontalAlignment="Left" Margin="0,0,0,1" Name="stackPanel3" Orientation="Horizontal">
                <TextBlock FontSize="14" Height="27" Name="textBlock19" Text="ชื่อเรื่อง :" TextAlignment="Right" Width="124" FontFamily="Tahoma" />
                <TextBox FontSize="14" Height="75" Margin="10,0,0,0" Name="TitletextBox" Width="440" Text="{Binding Path=MySend.Title, Mode=TwoWay}" TextWrapping="Wrap" TabIndex="7" FontFamily="Tahoma" />
            </StackPanel>
        <StackPanel Grid.Row="4" Name="stackPanel5" Orientation="Horizontal">
            <TextBlock FontSize="14" Height="23" Name="textBlock17" Text="จากหน่วยงาน :" TextAlignment="Right" Width="120" FontFamily="Tahoma" />
            <ComboBox DisplayMemberPath="ThaiName" FontSize="14" Height="28" ItemsSource="{Binding Path=EntityModels.Divisions}" Name="FormDivisionIDcomboBox" SelectedValue="{Binding Path=MySend.FromDivisionID, Mode=TwoWay}" SelectedValuePath="DivisionID" Width="199" Margin="10,0,0,0" TabIndex="5" FontFamily="Tahoma" />
        </StackPanel>
            <StackPanel Grid.Row="2" Name="stackPanel6" Orientation="Horizontal" Height="42" VerticalAlignment="Top">
            <TextBlock FontSize="14" Height="23" Name="textBlock16" Text="เลขที่หนังสือออก :" TextAlignment="Right" Width="120" FontFamily="Tahoma" />
            <TextBox FontSize="14" Height="30" Name="DocumentCodetextBox" Text="{Binding Path=MySend.CreateSendCode, Mode=TwoWay}" Width="188" Margin="10,0,0,0" TabIndex="3" FontFamily="Tahoma" />
        </StackPanel>
            <StackPanel Grid.Column="1" Grid.Row="3" Name="stackPanel7" Orientation="Horizontal">
                <TextBlock FontSize="14" Height="23" Name="textBlock20" Text="ชั้นความเร็วหนังสือ :" TextAlignment="Right" Width="124" FontFamily="Tahoma" />
                <GroupBox Height="33" Margin="10,0,0,0" Name="groupBox3" Width="299">
                    <Grid Height="31">
                        <RadioButton Content="ปกติ" FontSize="14" Height="25" HorizontalAlignment="Left" IsEnabled="True" Margin="6,6,0,0" Name="SpeedRadio1" VerticalAlignment="Top" IsChecked="{Binding Path=MySpeed1, Mode=TwoWay}" TabIndex="8" FontFamily="Tahoma" />
                        <RadioButton Content="ด่วน" FontSize="14" Height="23" HorizontalAlignment="Left" Margin="59,6,0,0" Name="SpeedRadio2" VerticalAlignment="Top" IsChecked="{Binding Path=MySpeed2, Mode=TwoWay}" TabIndex="9" FontFamily="Tahoma" />
                        <RadioButton Content="ด่วนมาก" FontSize="14" Height="24" HorizontalAlignment="Left" Margin="107,6,0,0" Name="SpeedRadio3" VerticalAlignment="Top" IsChecked="{Binding Path=MySpeed3, Mode=TwoWay}" TabIndex="10" FontFamily="Tahoma" />
                        <RadioButton Content="ด่วนที่สุด" FontSize="14" Height="22" HorizontalAlignment="Left" Margin="179,6,0,0" Name="SpeedRadio4" VerticalAlignment="Top" IsChecked="{Binding Path=MySpeed4, Mode=TwoWay}" TabIndex="11" FontFamily="Tahoma" />
                    </Grid>
                </GroupBox>
            </StackPanel>
            <StackPanel Grid.Column="1" Grid.Row="5" Grid.RowSpan="2" Name="stackPanel8" Orientation="Horizontal">
                <TextBlock FontSize="14" Height="28" Name="textBlock22" Text="หมายเหตุ :" TextAlignment="Right" Width="124" FontFamily="Tahoma" />
                <TextBox FontSize="14" Height="76" Margin="10,0,0,0" Name="DescriptiontextBox" Width="439" Text="{Binding Path=MySend.Description, Mode=TwoWay}" TextWrapping="Wrap" TabIndex="14" FontFamily="Tahoma" />
            </StackPanel>
            <StackPanel Grid.Row="5" Name="stackPanel9" Orientation="Horizontal">
            <TextBlock FontSize="14" Height="23" Name="textBlock18" Text="ถึงหน่วยงาน :" TextAlignment="Right" Width="120" FontFamily="Tahoma" />
            <ComboBox DisplayMemberPath="ThaiName" FontSize="14" Height="28" ItemsSource="{Binding Path=EntityModels.Divisions}" Name="ToDivisionIDcomboBox" SelectedValue="{Binding Path=MySend.ToDivisionID, Mode=TwoWay}" SelectedValuePath="DivisionID" Width="200" Margin="10,0,0,0" TabIndex="6" FontFamily="Tahoma" />
        </StackPanel>
            <StackPanel Grid.Row="6" Name="stackPanel10" Orientation="Horizontal"></StackPanel>
            <StackPanel Grid.Column="1" Grid.Row="7" Grid.RowSpan="3" Name="stackPanel11" Orientation="Horizontal">
                <TextBlock FontSize="14" Height="26" Name="textBlock24" Text="รายการไฟล์ :" TextAlignment="Right" Width="124" FontFamily="Tahoma" />
            <DataGrid AutoGenerateColumns="False" CanUserAddRows="True" ContextMenu="{StaticResource MyContextMenu}" FontSize="14" Height="123" IsReadOnly="True" ItemsSource="{Binding Path=AttachICV, Mode=TwoWay}" Name="dataGriListFileDataGrid" SelectedItem="{Binding Path=SelectedAttachFile, Mode=TwoWay}" Width="351" Margin="10,0,0,0" FontFamily="Tahoma">
                <DataGrid.Columns>
                    <!--<DataGridTextColumn Binding="{Binding Path=ScanSendAttachedID}" Header="รหัสไฟล์" />-->
                    <DataGridTextColumn Binding="{Binding Path=FileName}" Header="ชื่อไฟล์" />
                    <!--<DataGridTextColumn Binding="{Binding Path=Active}" Header="Active" />-->
                   
                </DataGrid.Columns>
            </DataGrid>
            <Button  Content="Browse" FontSize="14" Height="29" Margin="10,0,0,0" Name="BrowseButton" Width="75" Click="BrowseButton_Click" TabIndex="15" FontFamily="Tahoma" FontWeight="Bold" />
            </StackPanel>
            <StackPanel Grid.Column="1" Grid.Row="4" Name="stackPanel13" Orientation="Horizontal">
                <TextBlock FontSize="14" Height="23" Name="textBlock1" Text="การปฏิบัติ :" TextAlignment="Right" Width="124" FontFamily="Tahoma" />
                <GroupBox Height="33" Margin="10,0,0,0" Name="groupBox1" Width="299">
                    <Grid Height="31">
                        <RadioButton Content="อยู่ระหว่างดำเนินการ" FontSize="14" Height="27" HorizontalAlignment="Left" IsEnabled="True" Margin="6,6,0,0" Name="ActionRadioButton1" VerticalAlignment="Top" IsChecked="{Binding Path=MyAction1, Mode=TwoWay}" TabIndex="12" FontFamily="Tahoma" />
                        <RadioButton Content="ดำเนินการเรียบร้อย" FontSize="14" Height="21" HorizontalAlignment="Left" Margin="147,7,0,0" Name="ActionRadioButton2" VerticalAlignment="Top" IsChecked="{Binding Path=MyAction2, Mode=TwoWay}" TabIndex="13" FontFamily="Tahoma" />
                    </Grid>
                </GroupBox>
            </StackPanel>
            <StackPanel Grid.ColumnSpan="2" Grid.Row="10" Name="stackPanel14" Orientation="Horizontal">
                <Button  Content="บันทึก" FontSize="14" Height="29" Margin="400,0,0,0" Name="SaveButton" Width="75" Click="SaveButton_Click" TabIndex="16" FontFamily="Tahoma" FontWeight="Bold" />
                <Button Content="ยกเลิก" FontSize="14" Height="29" Margin="50,0,0,0" Name="CancelButton" Width="75" Click="CancelButton_Click" TabIndex="17" FontFamily="Tahoma" FontWeight="Bold" />
            </StackPanel>
            <StackPanel Grid.ColumnSpan="2" Name="stackPanel1" Orientation="Horizontal">
                <TextBlock FontSize="18" Height="30" Name="textBlock2" Text="เพิ่มข้อมูลหนังสือออก" TextAlignment="Center" Width="1001" FontFamily="Tahoma" FontWeight="Bold" />
            </StackPanel>
        <StackPanel Grid.Row="3" Name="stackPanel4" Orientation="Horizontal">
            <TextBlock FontSize="14" Height="23" Name="textBlock14" Text="วันที่ออกหนังสือ :" TextAlignment="Right" Width="120" FontFamily="Tahoma" />
            <StackPanel Height="30" Name="stackPanel16" Width="200" Margin="10,0,0,0">
                <DatePicker FontSize="14" Height="30" HorizontalAlignment="Left" Margin="0" SelectedDate="{Binding Path=MySend.CreateSendDate, Mode=TwoWay}" Width="120" TabIndex="4" FontFamily="Tahoma" />
            </StackPanel>
        </StackPanel>
    </Grid>
  
</Window>
